package com.elh.jvm.classpath;

import cn.hutool.core.io.FileUtil;

import java.io.File;

/**
 * 使用文件目录加文件名读取文件
 *
 * @author liulei
 **/
public class DictEntry implements Entry{

    private String path;

    public DictEntry(String path) {
        this.path = path;
    }

    @Override
    public byte[] readClass(String className) {
        File file = new File(path + File.separator + className);
        return FileUtil.readBytes(file);
    }
}
